<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>test</title>
</head>
<body>
<div id="app">
<!--  静态属性-->
<!--  <child-component content="static content">-->
<!--  子组件属性-->
<!--  <child-component title="title">-->
  <!--  子组件属性-->
<!--  <child-component :title="item.title">-->
  <child-component :item-content="item.content">
  </child-component>
</div>


<!--<script ></scriptVue.>-->
<script src="vue.global.js"></script>
<script>
  const children = {
    data(){
      return{
        title: 'children title'
      }
    },
    props: ['itemTitle', 'itemContent'],
    template:`
    <h3>{{itemContent}}</h3>
    <h3>{{title}}</h3>
    `
  }
  const app = Vue.createApp({
    data(){
      return{
        item: {
          title: 'Dynamic title',
          content: 'Dynamic content'
        }
      }
    },
    components: {
      'child-component': children
    }
  }).mount('#app')
</script>
</body>
</html>
